<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>

		<h:form id="menuForm">

			<p:growl id="messages" />

			<p:menubar>
				<p:submenu label="Sistema" icon="ui-icon-document">
					<p:submenu label="Gerenciar Contas" icon="ui-icon-document" rendered="#{usuarioBean.ehAdministrador}">
						<p:menuitem value="Cadastrar usuário"
						action="#{usuarioBean.cadastrarUsuario}"
						icon="ui-icon-arrow-1-e" />
						<p:menuitem value="Listar usuários"
						action="#{usuarioBean.listarUsuarios}"
						icon="ui-icon-carat-2-e-w" />
					</p:submenu>
					<p:menuitem value="Trocar usuário"
						action="#{menuBean.logout}"
						icon="ui-icon-transferthick-e-w" />
					<p:menuitem value="Página Inicial"
						action="/paginas/menu?faces-redirect=true"
						icon="ui-icon-home" />
					<p:separator />
					<p:menuitem value="Sair do sistema"
						action="#{menuBean.logout}"
						icon="ui-icon-power" />
				</p:submenu>
				
				<p:submenu label="Processo" icon="ui-icon-document">
					<p:menuitem value="Novo Processo"
						action="#{processoBean.paginaCriarProcesso}"
						icon="ui-icon-document-b" />
					<p:menuitem value="Listar Processos"
						action="#{processoBean.paginaListarProcessos}"
						icon="ui-icon-zoomin" />
				</p:submenu>

				<p:submenu label="Ajuda" icon="ui-icon-help">
					<p:menuitem value="Primefaces" url="http://www.primefaces.org/showcase/ui/home.jsf"
						target="_blank" />
				</p:submenu>

				<p:menuitem value="Sair do sistema"
					action="#{menuBean.logout}"
					icon="ui-icon-power" />
			</p:menubar>

		</h:form>

	</ui:composition>
</body>
</html>